<?php
//Max
include_once 'UTerrorcode.php';
include_once 'UTcheckAuth.php';
include_once 'UTDBGlobal.php';

function getNeedApprovalShifts($authUser, $authUserPass, $arrayOfData)
{
	global $dbaddress;
    global $dbuser;
    global $dbpassword;
    global $dbdatabasename;
	
      if (checkAuthorization($authUser, $authUserPass) != true){
	     return array(ErrorCode::authFailRead);	
      }

      $conn=mysql_connect($dbaddress,$dbuser,$dbpassword,$dbdatabasename);
      if(!$conn)
      {
           die('Could not connect: ' . mysql_error());
         return array(ErrorCode::sysError);
      }

      //$sql = "SELECT $arrayOfData['roleID'] FROM roleDate WHERE shiftStatus!='Occupied*' AND roleID=$arrayOfData['roleID']";
      $result = mysql_query($conn, $sql);
      $row = mysql_fetch_row($result);
      //if ($row != null){
      //  mysql_close($conn);
      //  return array(ErrorCode::failRead);
      //} else {
      //  $output = mysql_fetch_array($result);
      //  mysql_close($conn);
      //      return array(ErrorCode::successRead, $output);
      //}
	  
}
?>